function titleBlackToHtml(elem, childrenHtml) {
    const attributes = elem.allAttributes || {};
    let attributesString = '';
    for (const [attr, value] of Object.entries(attributes)) {
        attributesString += `${attr}="${value}" `;
    }
    attributesString = attributesString.trim();

    if (elem.myTagName === 'img') {
        return `<${elem.myTagName} ${attributesString} />`;
    }

    return `<${elem.myTagName} ${attributesString}>${childrenHtml}</${elem.myTagName}>`;
}

export const elemToHtmlConf = {
    type: 'mention',
    elemToHtml: titleBlackToHtml,
};